﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace kim.Web
{
    public partial class apply : kim.UI.BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnsubmit_Click(object sender, EventArgs e)
        {
            Model.Message mo = new Model.Message();
            mo.MsUserName = txtname.Value.Trim();
            mo.MsTel = txttel.Value.Trim();
            mo.MsPhone = txttel.Value.Trim();
            mo.MsEmail = txtmail.Value.Trim();
            mo.MsContent = txtContent.Value.Trim();
            mo.MsModel = int.Parse(ddlClass.SelectedValue);
            mo.MsType = 1;
            mo.MsBudget = txtqq.Value.Trim();
            mo.MsTitle = txtbkyx.Value.Trim();
            mo.MsAddress = txtbkzy.Value.Trim();
            BLL.Message bll = new BLL.Message();
            if (bll.Add(mo) > 0)
                lblmsg.Text = "报名成功";
            else
                lblmsg.Text = "报名失败";
        }
    }
}